<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
 <%

 String path = request.getContextPath();
 	String basePath = request.getScheme() + "://"
 			+ request.getServerName() + ":" + request.getServerPort()
 			+ path + "/";
 %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
  
  <head>
    <meta charset="utf-8">
    <title>管理员</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <!-- Le styles -->
    <link href="<%=basePath%>assets/css/bootstrap.css" rel="stylesheet">

    <style>
      body { padding-top: 60px; /* 60px to make the container go all the way
      to the bottom of the topbar */ }
    </style>
    <link href="<%=basePath%>assets/css/bootstrap-responsive.css" rel="stylesheet">
    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js">
      </script>
    <![endif]-->
    <!-- Le fav and touch icons -->
    <link rel="shortcut icon" href="<%=basePath%>assets/ico/favicon.ico">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="<%=basePath%>assets/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="<%=basePath%>assets/ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="<%=basePath%>assets/ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="<%=basePath%>assets/ico/apple-touch-icon-57-precomposed.png">
    <style>
    </style>
  </head>
  <body>
    <div class="container-fluid">
  <div class="row-fluid">
    <div class="span2">
      <!--Sidebar content-->
      	<h4><a href="demoAction.action">首页</a></h4>
      	<h4><a href="demoAction.action?type=manager">公告列表</a></h4>
      	<h4><em>用户列表<em></h4>
      	
    </div>
    <div class="span10">
    <legend>公告列表</legend>
      <!--Body content-->
      <a href="addUserAction.action">添加用户</a>
      <table class="table table-striped table-bordered table-condensed">
	        <thead>
              <tr>
			    <th>Id</th>
			    <th>Username</th>
			    <th>Password</th>
			    <th>Age</th>
			   </tr>
        </thead>
        <tbody>
	    <s:iterator value="#request.USER_LIST">
	    <tr>
		    <td>${id}</td>
		    <td><a href="#" onclick="javascript:edit('${id}')">${username}</a></td>
		    <td>${password}</td>
	    	<td>${age}</td>
	    </tr>
	     </s:iterator>
        </tbody>
      </table>
      <hr>
   <form action="userFindAction.action" name="editUserForm" id="editUserForm">
<input type="hidden" name="id" id="id">
</form>   
      
    </div>
  </div>
</div>


    <%-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"> --%>
    <script src="<%=basePath%>assets/ajax/jquery/jquery-1.9.1.min.js"></script>
    <script src="<%=basePath%>assets/js/bootstrap.js"></script>
	<script type="text/javascript">
		function edit(id){
			$("#id").attr("value",id);
			$("#editUserForm").submit();
		}
    </script>
  </body>
</html>
